/**
 *
 * @author cuntmaster
 */
package erp.projekt;

import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.swing.tree.DefaultMutableTreeNode;

public class Produkte extends javax.swing.JFrame {

    SqlProduktGruppen gruppen = new SqlProduktGruppen();
    SqlProdukte produkte = new SqlProdukte();
    SqlProduktLieferanten lieferanten = new SqlProduktLieferanten();
    DefaultMutableTreeNode root = this.getProduktGruppenTreeItems();
    List<String> list = produkte.getProdukteByGruppe("Notebook");
    //Image img = Toolkit.getDefaultToolkit().getImage("images/icon545.png");
    //setIconImage(img); nasty
    /**
     * Creates new form Produkte
     */
    public Produkte() throws SQLException {
        initComponents();
        zeigeDatum();
        zeigeProduktByID(2);
        zeigeAnzahlProdukte();
        //setIconImage(img);
    }
    //gibt vollstaendigen TreeNode zurueck oder auch nicht

    private DefaultMutableTreeNode getProduktGruppenTreeItems() throws SQLException {
        //Liste der ProduktGruppen
        List<String> produktGruppen = gruppen.getProduktGruppen();
        //Anlegen eines Knoten (root) "Produktgruppen"
        DefaultMutableTreeNode knoten = new DefaultMutableTreeNode("Produktgruppen");
        //für jede Produktgruppe -> item
        for (String item : produktGruppen) {

            //neuen Node $Produktgruppe anlegen
            DefaultMutableTreeNode node = new DefaultMutableTreeNode(item);

            //Liste Bezeichnung der Produkte für die jeweilige Produktgruppe
            List<String> produkteInGruppe = produkte.getProdukteByGruppe(item);

            //falls nicht leer -> addChild
            if (produkteInGruppe != null) {
                for (String itemProdukt : produkteInGruppe) {
                    node.add(new DefaultMutableTreeNode(itemProdukt));
                }
                // knoten zu root hinzufuegen
                knoten.add(node);
            }
        }
        //gibt Knoten zurueck
        return knoten;
    }

    private void zeigeProduktByID(int ID) throws SQLException {

        List<String> produktGruppen = gruppen.produktGruppen;

        for (int i = 0; i < gruppen.produktGruppen.size(); i++) {
            jcbProduktGruppen.addItem(produktGruppen.get(i));
        }

        List<String> produktLieferanten = lieferanten.produktLieferanten;

        for (int i = 0; i < lieferanten.produktLieferanten.size(); i++) {
            jcbProduktLieferant.addItem(produktLieferanten.get(i));
        }

        List<String> produkt = produkte.getProduktById(ID);

        jtxProduktId.setText(produkt.get(0));
        jtxProduktBezeichnung.setText(produkt.get(1));
        jtxProduktGruppeText.setText(gruppen.getProduktGruppeById(ID));
        jtxProduktVerkaufspreis.setText(produkt.get(3));
        jtxProduktLieferant.setText(lieferanten.getProduktLieferantById(ID));
        jtxProduktEinkaufspreis.setText(produkt.get(5));
        jtxProduktLieferzeit.setText(produkt.get(6));
        jtxProduktMindestbestand.setText(produkt.get(7));
        jtxProduktHinweis.setText(produkt.get(8));
        jtxProduktMengeBestellt.setText(produkt.get(9));
        jtxProduktUmsatzsteuersatz.setText(produkt.get(10));
        jtxProduktAktiv.setText(produkt.get(11));
        jtxProduktInaktivAm.setText(produkt.get(12));
        jtxProduktInaktivVon.setText(produkt.get(13));
    }

    private void aendereProduktById() {
    }

    private void zeigeAnzahlProdukte() {

        jLabelCountProdukte.setText(Integer.toString(produkte.getProdukteCount()));
    }

    private void zeigeDatum() {
        SimpleDateFormat dfDDMMYYYY = new SimpleDateFormat("dd.MM.yyyy");
        jLabelDatum.setText(dfDDMMYYYY.format(new Date()));
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanelProduktGruppen = new javax.swing.JPanel();
        jcbProduktGruppen = new javax.swing.JComboBox();
        jcbProduktLieferant = new javax.swing.JComboBox();
        jtxProduktId = new javax.swing.JTextField();
        jtxProduktBezeichnung = new javax.swing.JTextField();
        jtxProduktGruppeText = new javax.swing.JTextField();
        jtxProduktVerkaufspreis = new javax.swing.JTextField();
        jtxProduktLieferant = new javax.swing.JTextField();
        jtxProduktEinkaufspreis = new javax.swing.JTextField();
        jtxProduktLieferzeit = new javax.swing.JTextField();
        jtxProduktMindestbestand = new javax.swing.JTextField();
        jtxProduktHinweis = new javax.swing.JTextField();
        jtxProduktMengeBestellt = new javax.swing.JTextField();
        jtxProduktUmsatzsteuersatz = new javax.swing.JTextField();
        jtxProduktAktiv = new javax.swing.JTextField();
        jtxProduktInaktivAm = new javax.swing.JTextField();
        jtxProduktInaktivVon = new javax.swing.JTextField();
        jLabelProduktId = new javax.swing.JLabel();
        jLabeBez = new javax.swing.JLabel();
        jLabelGruppe = new javax.swing.JLabel();
        jLabelVk = new javax.swing.JLabel();
        jLabelLieferant = new javax.swing.JLabel();
        jLabelLieferzeit = new javax.swing.JLabel();
        jLabelEk = new javax.swing.JLabel();
        jLabelMinBestand = new javax.swing.JLabel();
        jLabelHinweis = new javax.swing.JLabel();
        jLabelBestellt = new javax.swing.JLabel();
        jLabelUst = new javax.swing.JLabel();
        jLabelAktiv = new javax.swing.JLabel();
        jLabelInaktivAm = new javax.swing.JLabel();
        jLabelInaktivVon = new javax.swing.JLabel();
        jPanel1Footer = new javax.swing.JPanel();
        jLabelTextCountProdukte = new javax.swing.JLabel();
        jLabelCountProdukte = new javax.swing.JLabel();
        jLabelTextDatum = new javax.swing.JLabel();
        jLabelDatum = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTreeProduktGruppen = new javax.swing.JTree(root);

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setBackground(new java.awt.Color(255, 255, 255));

        jPanelProduktGruppen.setBackground(java.awt.Color.white);
        jPanelProduktGruppen.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        jPanelProduktGruppen.setForeground(new java.awt.Color(17, 24, 87));

        jLabelProduktId.setBackground(java.awt.Color.white);
        jLabelProduktId.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelProduktId.setForeground(new java.awt.Color(17, 24, 87));
        jLabelProduktId.setText("ProduktId");

        jLabeBez.setBackground(java.awt.Color.white);
        jLabeBez.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabeBez.setForeground(new java.awt.Color(17, 24, 87));
        jLabeBez.setText("Bezeichnung");

        jLabelGruppe.setBackground(java.awt.Color.white);
        jLabelGruppe.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelGruppe.setForeground(new java.awt.Color(17, 24, 87));
        jLabelGruppe.setText("ProduktGruppe");

        jLabelVk.setBackground(java.awt.Color.white);
        jLabelVk.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelVk.setForeground(new java.awt.Color(17, 24, 87));
        jLabelVk.setText("Verkaufspreis");

        jLabelLieferant.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelLieferant.setForeground(new java.awt.Color(17, 24, 87));
        jLabelLieferant.setText("Lieferant");

        jLabelLieferzeit.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelLieferzeit.setForeground(new java.awt.Color(17, 24, 87));
        jLabelLieferzeit.setText("Lieferzeit");

        jLabelEk.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelEk.setForeground(new java.awt.Color(17, 24, 87));
        jLabelEk.setText("Einkaufspreis");

        jLabelMinBestand.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelMinBestand.setForeground(new java.awt.Color(17, 24, 87));
        jLabelMinBestand.setText("Mindestbestand");

        jLabelHinweis.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelHinweis.setForeground(new java.awt.Color(17, 24, 87));
        jLabelHinweis.setText("Hinweis");

        jLabelBestellt.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelBestellt.setForeground(new java.awt.Color(17, 24, 87));
        jLabelBestellt.setText("Menge bestellt");

        jLabelUst.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelUst.setForeground(new java.awt.Color(17, 24, 87));
        jLabelUst.setText("Umsatzsteuer");

        jLabelAktiv.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelAktiv.setForeground(new java.awt.Color(17, 24, 87));
        jLabelAktiv.setText("Aktiv");

        jLabelInaktivAm.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelInaktivAm.setForeground(new java.awt.Color(17, 24, 87));
        jLabelInaktivAm.setText("Inaktiv am");

        jLabelInaktivVon.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelInaktivVon.setForeground(new java.awt.Color(17, 24, 87));
        jLabelInaktivVon.setText("Inaktiv von");

        javax.swing.GroupLayout jPanelProduktGruppenLayout = new javax.swing.GroupLayout(jPanelProduktGruppen);
        jPanelProduktGruppen.setLayout(jPanelProduktGruppenLayout);
        jPanelProduktGruppenLayout.setHorizontalGroup(
            jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelProduktGruppenLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jLabelLieferzeit, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabeBez, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabelGruppe, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabelVk, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabelLieferant, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabelEk, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanelProduktGruppenLayout.createSequentialGroup()
                        .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabelMinBestand, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
                            .addComponent(jLabelProduktId, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelHinweis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtxProduktHinweis, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktLieferzeit, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktMindestbestand, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktEinkaufspreis, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktLieferant, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktVerkaufspreis, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktGruppeText, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktBezeichnung, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktId, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanelProduktGruppenLayout.createSequentialGroup()
                        .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabelInaktivAm, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelInaktivVon, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelUst, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelAktiv, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelBestellt, javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtxProduktInaktivAm, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktInaktivVon, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktMengeBestellt, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktAktiv, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxProduktUmsatzsteuersatz, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcbProduktLieferant, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbProduktGruppen, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanelProduktGruppenLayout.setVerticalGroup(
            jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelProduktGruppenLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelProduktId))
                .addGap(11, 11, 11)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktBezeichnung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabeBez))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktGruppeText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelGruppe)
                    .addComponent(jcbProduktGruppen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktVerkaufspreis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelVk))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktLieferant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelLieferant)
                    .addComponent(jcbProduktLieferant, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktEinkaufspreis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelEk))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktLieferzeit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelLieferzeit))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktMindestbestand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelMinBestand))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktHinweis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelHinweis))
                .addGap(16, 16, 16)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelBestellt)
                    .addComponent(jtxProduktMengeBestellt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktUmsatzsteuersatz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelUst))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktAktiv, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelAktiv))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtxProduktInaktivAm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelInaktivAm))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelProduktGruppenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelInaktivVon)
                    .addComponent(jtxProduktInaktivVon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(40, Short.MAX_VALUE))
        );

        jPanel1Footer.setBackground(new java.awt.Color(17, 24, 87));

        jLabelTextCountProdukte.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelTextCountProdukte.setForeground(new java.awt.Color(255, 255, 255));
        jLabelTextCountProdukte.setText("Produkte in der Datenbank:");

        jLabelCountProdukte.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelCountProdukte.setForeground(new java.awt.Color(255, 255, 255));

        jLabelTextDatum.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelTextDatum.setForeground(new java.awt.Color(255, 255, 255));
        jLabelTextDatum.setText("Datum:");

        jLabelDatum.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jLabelDatum.setForeground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout jPanel1FooterLayout = new javax.swing.GroupLayout(jPanel1Footer);
        jPanel1Footer.setLayout(jPanel1FooterLayout);
        jPanel1FooterLayout.setHorizontalGroup(
            jPanel1FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1FooterLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelTextCountProdukte)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1FooterLayout.createSequentialGroup()
                        .addComponent(jLabelCountProdukte)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1FooterLayout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jLabelTextDatum)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabelDatum, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1FooterLayout.setVerticalGroup(
            jPanel1FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1FooterLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1FooterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTextCountProdukte, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE)
                    .addComponent(jLabelCountProdukte)
                    .addComponent(jLabelTextDatum)
                    .addComponent(jLabelDatum))
                .addContainerGap())
        );

        jPanel1.setBackground(new java.awt.Color(17, 24, 87));

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 45, Short.MAX_VALUE)
        );

        jScrollPane2.setBackground(new java.awt.Color(255, 255, 255));
        jScrollPane2.setBorder(null);

        jTreeProduktGruppen.setBackground(new java.awt.Color(255, 255, 255));
        jTreeProduktGruppen.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        jTreeProduktGruppen.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N
        jTreeProduktGruppen.setForeground(new java.awt.Color(17, 24, 87));
        jTreeProduktGruppen.setModel(jTreeProduktGruppen.getModel());
        jScrollPane2.setViewportView(jTreeProduktGruppen);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1Footer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelProduktGruppen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane2)
                    .addComponent(jPanelProduktGruppen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1Footer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Produkte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Produkte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Produkte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Produkte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                try {
                    new Produkte().setVisible(true);
                } catch (SQLException ex) {
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabeBez;
    private javax.swing.JLabel jLabelAktiv;
    private javax.swing.JLabel jLabelBestellt;
    private javax.swing.JLabel jLabelCountProdukte;
    private javax.swing.JLabel jLabelDatum;
    private javax.swing.JLabel jLabelEk;
    private javax.swing.JLabel jLabelGruppe;
    private javax.swing.JLabel jLabelHinweis;
    private javax.swing.JLabel jLabelInaktivAm;
    private javax.swing.JLabel jLabelInaktivVon;
    private javax.swing.JLabel jLabelLieferant;
    private javax.swing.JLabel jLabelLieferzeit;
    private javax.swing.JLabel jLabelMinBestand;
    private javax.swing.JLabel jLabelProduktId;
    private javax.swing.JLabel jLabelTextCountProdukte;
    private javax.swing.JLabel jLabelTextDatum;
    private javax.swing.JLabel jLabelUst;
    private javax.swing.JLabel jLabelVk;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel1Footer;
    private javax.swing.JPanel jPanelProduktGruppen;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTree jTreeProduktGruppen;
    private javax.swing.JComboBox jcbProduktGruppen;
    private javax.swing.JComboBox jcbProduktLieferant;
    private javax.swing.JTextField jtxProduktAktiv;
    private javax.swing.JTextField jtxProduktBezeichnung;
    private javax.swing.JTextField jtxProduktEinkaufspreis;
    private javax.swing.JTextField jtxProduktGruppeText;
    private javax.swing.JTextField jtxProduktHinweis;
    private javax.swing.JTextField jtxProduktId;
    private javax.swing.JTextField jtxProduktInaktivAm;
    private javax.swing.JTextField jtxProduktInaktivVon;
    private javax.swing.JTextField jtxProduktLieferant;
    private javax.swing.JTextField jtxProduktLieferzeit;
    private javax.swing.JTextField jtxProduktMengeBestellt;
    private javax.swing.JTextField jtxProduktMindestbestand;
    private javax.swing.JTextField jtxProduktUmsatzsteuersatz;
    private javax.swing.JTextField jtxProduktVerkaufspreis;
    // End of variables declaration//GEN-END:variables
}
